'\"macro stdmacro
.\"
.\" Copyright (c) 2014 Red Hat.
.\" Copyright (c) 2008 Aconex.  All Rights Reserved.
.\" Copyright (c) 2004 Silicon Graphics, Inc.  All Rights Reserved.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.\"
.TH PMDADBPING 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pmdadbping\f1 \- database response time and availability PMDA
.SH DESCRIPTION
\f3pmdadbping\f1 is a database response time measurement \s-1PMDA\s0.
.PP
\&\fBpmdadbping\fR runs \fBdbprobe\fR\|(1), and exports the performance
measurements it makes available as \s-1PCP\s0 metrics.
.PP
\fBdbprobe\fR\|(1) should be configured to use the type of \s-1DBI\s0
appropriate for the local database, which includes: \s-1RDBMS\s0 flavour,
user/password, delay between "ping" requests, and the \s-1SQL\s0
statement to use.
.SH INSTALLATION
Configure \fBdbprobe\fR\|(1) \- it uses a configuration file from
(in this order):
.IP "\(bu" 4
/etc/pcpdbi.conf
.IP "\(bu" 4
\&\f(CW$PCP_PMDAS_DIR\fR/dbping/dbprobe.conf
.PP
This file can contain overridden values (Perl code) for the settings
listed at the start of
.IR dbprobe.pl ,
namely:
.IP "\(bu" 4
database name (see \s-1\fBDBI\s0\fR\|(3) for details)
.IP "\(bu" 4
database user name
.IP "\(bu" 4
database pass word
.IP "\(bu" 4
\&\s-1SQL\s0 statement to measure (probe)
.IP "\(bu" 4
delay between probes
.PP
Once this is setup, you can access the names and values for the
dbping performance metrics by doing the following as root:
.sp 1
.RS +4
.ft B
.nf
# cd $PCP_PMDAS_DIR/dbping
# ./Install
.fi
.ft P
.RE
.sp 1
To uninstall, the following must be done as root:
.sp 1
.RS +4
.ft B
.nf
# cd $PCP_PMDAS_DIR/dbping
# ./Remove
.fi
.ft P
.RE
.sp 1
\fBpmdadbping\fR is launched by \fIpmcd\fR(1) and should never be executed
directly. The Install and Remove scripts notify \fIpmcd\fR(1) when the
agent is installed or removed.
.SH FILES
.IP "\fB$PCP_PMDAS_DIR/dbping/dbprobe.conf\fR" 4
probe configuration file for \fIdbprobe\fR\|(1), used indirectly by \fBpmdadbping\fR
.IP "\fB$PCP_PMDAS_DIR/dbping/Install\fR" 4
installation script for the \fBpmdadbping\fR agent
.IP "\fB$PCP_PMDAS_DIR/dbping/Remove\fR" 4
undo installation script for the \fBpmdadbping\fR agent
.IP "\fB$PCP_LOG_DIR/pmcd/dbping.log\fR" 4
default log file for error messages from \fBpmdadbping\fR
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fR are used to parameterize
the file and directory names used by \fBPCP\fR. On each installation, the
file \fB/etc/pcp.conf\fR contains the local values for these variables.
The \fB$PCP_CONF\fR variable may be used to specify an alternative
configuration file, as described in \fIpcp.conf\fR(5).
.SH SEE ALSO
.BR PCPIntro (1),
.BR pmcd (1),
.BR dbprobe (1)
and
.BR DBI (3).
